-- GENERATED SPELL FOR [Night Elf Ancient Protector] --


function spell0_18487(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(11922,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18487', 16500, 1)
end

function spell1_18487(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(45,pUnit)
pUnit:RegisterEvent('Sorts_18487', 577, 1)
end

function Sorts_18487(pUnit, Event)
local choix_sorts_18487 = math.random(0, 1)
if choix_sorts_18487 == 0 then
pUnit:RegisterEvent('spell0_18487', 1, 1)
end
if choix_sorts_18487 == 1 then
pUnit:RegisterEvent('spell1_18487', 1, 1)
end
end

function mob18487_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18487', math.random(1500, 3000), 1)
end

function mob18487_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18487_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18487_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18487, 1, 'mob18487_Action')
RegisterUnitEvent(18487, 2, 'mob18487_Leave')
RegisterUnitEvent(18487, 3, 'mob18487_Kill')
RegisterUnitEvent(18487, 4, 'mob18487_Die')
